home *** CD-ROM | disk | FTP | other *** search
-
- /* ------ DEBUG ------ */
-
- INT groupofpictures_count = 0;
- INT pictureheader_count = 0;
- INT sliceheader_count = 0;
- int current_makroblock = 0;
-
- /* ------ Rate Control ------ */
- int Rate = 0;
- int BufferSize = 0;
-
-
-
- /* ------ Video sequence information ------ */
-
- int HorizontalSize=0; /* Horizontal dimensions */
- int VerticalSize=0; /* Vertical dimensions */
- int Aprat = 1; /* Aspect ratio */
- int DropFrameFlag=0; /* Whether frame will be dropped */
- int Prate = 5; /* Picture rate (def 30fps) */
- int Brate = 0x3fff; /* Bit rate */
- int Bsize = 0; /* Buffer size */
- int ConstrainedParameterFlag=0; /* Default: unconstrained */
- int LoadIntraQuantizerMatrix=0; /* Quantization load */
- int LoadNonIntraQuantizerMatrix=0;
-
-
- /* Group of pictures layer */
-
- int TimeCode= -1; /* SMPTE timestamp */
- int ClosedGOP=0; /* Back pred. needed of GOP */
- int BrokenLink=0; /* Whether editing has occurred. */
- /* Picture layer */
- int TemporalReference=0; /* "frame" reference with base of GOP */
- int PType=P_INTRA; /* Picture type */
- INT BufferFullness=0; /* Current fullness of buffer */
- int FullPelForward=0; /* Foward motion vector on full pel */
- int ForwardIndex=0; /* Decoding table to be used */
- int FullPelBackward=0; /* Backward motion vector on full pel */
- int BackwardIndex=0; /* Decoding table to be used */
- int PictureExtra=0; /* Flag set if extra info present */
- int PictureExtraInfo=0;
-
- /* slice layer */
-
- int SQuant=1; /* Slice quantization */
- int MBperSlice=0; /* Number of macroblocks per slice */
- /* If zero, set automaticallly */
- int SliceExtra=0; /* (Last) slice extra flag */
- int SliceExtraInfo=0; /* (Last) slice extra information */
-
- /* makroblock layer */
-
- int MType=0; /* Macroblock type */
-
-
- int LastMType; /* Last encoded MType */
- int SkipMode; /* Whether we skip coding */
- int EncStartSlice; /* If encoder has started a slice */
- int EncEndSlice; /* If encoder has ended a slice */
- int EncPerfectSlice=1; /* Set if you want first and last block */
- /* of a slice to be defined. Clear if you */
- /* allow skipped macroblocks between frames */
- int UseTimeCode=0;/*If 1 forces frame number to be same as time code */
-
- int MQuant=1; /* Macroblock quantization */
- int SVP=0; /* Slice vertical position */
- int MVD1H=0; /* Forward motion vector */
- int MVD1V=0;
- int MVD2H=0; /* Backward motion vector */
- int MVD2V=0;
- int LastMVD1H=0; /* Interpolative predictors */
- int LastMVD1V=0;
- int LastMVD2H=0;
- int LastMVD2V=0;
- int CBP=0x3f; /* Coded block pattern */
-
- int MBSRead=0;
- int MBAIncrement=0;
- int LastMBA=0;
- int CurrentMBA=0;
-
- /* ------ Type Definitions ------ */
-
- /*
- We define the following variables by layers, to avoid compatibility
- problems with compilers unable to do automatic aggregate
- initialization.
-
- The MType arrays are indexed on macroblock type.
- The PMType arrays are indexed on picture type and macroblock type.
- */
-
- /* --- Quantization used --- */
-
- int DCQuantMType[] = {0};
- int IntraQuantMType[] = {0,1};
- int PredQuantMType[] = {0,0,0,0,1,1,1};
- int InterQuantMType[] = {0,0,0,0,0,0,0,1,1,1,1};
- int *QuantPMType[] = {
- (int *) 0,
- IntraQuantMType,
- PredQuantMType,
- InterQuantMType,
- DCQuantMType};
-
- /* --- Motion forward vector used --- */
-
-
- int IntraMFMType[] = {0,0};
- int PredMFMType[] = {1,0,1,0,1,0,0};
- int InterMFMType[] = {1,1,0,0,1,1,0,1,1,0,0};
- int DCMFMType[] = {0};
- int *MFPMType[] = {
- (int *) 0,
- IntraMFMType,
- PredMFMType,
- InterMFMType,
- DCMFMType};
-
- /* --- Motion backward vector used --- */
-
- int IntraMBMType[] = {0,0};
- int PredMBMType[] = {0,0,0,0,0,0,0};
- int InterMBMType[] = {1,1,1,1,0,0,0,1,0,1,0};
- int DCMBMType[] = {0};
- int *MBPMType[] = {
- (int *) 0,
- IntraMBMType,
- PredMBMType,
- InterMBMType,
- DCMBMType};
-
- /* --- CBP used in coding --- */
-
- int IntraCBPMType[] = {0,0};
- int PredCBPMType[] = {1,1,0,0,1,1,0};
- int InterCBPMType[] = {0,1,0,1,0,1,0,1,1,1,0};
- int DCCBPMType[] = {0};
- int *CBPPMType[] = {
- (int *) 0,
- IntraCBPMType,
- PredCBPMType,
- InterCBPMType,
- DCCBPMType};
-
- /* --- Intra coded macroblock --- */
-
- int IntraIMType[] = {1,1};
- int PredIMType[] = {0,0,0,1,0,0,1};
- int InterIMType[] = {0,0,0,0,0,0,1,0,0,0,1};
- int DCIMType[] = {1};
- int *IPMType[] = {
- (int *) 0,
- IntraIMType,
- PredIMType,
- InterIMType,
- DCIMType};
-
-
-